package com.pshcp.common.enums;

/**
 * @Description: 费用类型 1门诊 2住院
 * @Author: xiaoche
 * @Date: 2022/10/29 12:36
 */
public enum FeeTypeEnum {

    OUT(1, "门诊"),

    HOS(2, "住院"),

    ;

    private Integer code;
    private String desc;

    FeeTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDescByCode(int code){
        for(FeeTypeEnum e : FeeTypeEnum.values()){
            if(e.getCode().intValue() == code){
                return e.getDesc();
            }
        }
        return null;
    }

}
